package com.vtc.session5;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import com.vtc.R;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.os.StrictMode;
import android.os.StrictMode.ThreadPolicy;
import android.widget.ImageView;

public class ImageActvity extends Activity{

	@SuppressLint("NewApi")
	@SuppressWarnings("deprecation")
	@Override
	protected void onCreate(Bundle savedInstanceState) {	
		super.onCreate(savedInstanceState);		
		ImageView img = new ImageView(this);
		//img.setImageResource(R.drawable.img1);
		AssetManager asset = getAssets();
		
		InputStream file;
		ThreadPolicy tp = ThreadPolicy.LAX;
		StrictMode.setThreadPolicy(tp);
		try {
			img.setImageResource(R.drawable.img1);
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		this.setContentView(img);
	}
	
}
